###########################################################################################
### REPLICATION ARCHIVE ###################################################################
### Title: "Local exposure to inequality raises the poor's support for taxing the rich" ###
### Authors: Melissa L. Sands & Daniel de Kadt ############################################
### Journal: Nature #######################################################################
### Year: 2020 ############################################################################
### This file: Readme for replication archive #############################################
###########################################################################################

###Introduction###
To replicate the paper's results, first extract the folder "exposure_to_inequality_sandsdekadt_2020_nature.rar" to your system. The extracted folder will have a pre-defined taxonomy. The code files interact with the data files to produce output in the output folders. 

If you find any problems, have any questions, or would like clarification, please contact us at:
Melissa Sands: mlsands@gmail.com
Daniel de Kadt: ddekadt@gmail.com

Thank you for your interest in our work!

###Archive taxonomy description###

##The code folder:
1) code:

1a) stata_do: [Run these first if you wish to replicate the paper]
experiment_analysis.do: the do file for analyzing the experimental data
observational_analysis.do: the do file for analyzing the observational data

1b) R_code:  
1ba) figures_code: [Run these only after the analysis files above, as they depend on the output thereof]
experiment_point_estimate_figure.R: produces the experiment results figure in the main text
observational_gauteng_map.R: produces the inequality map of Gauteng in the ED
observational_interaction_figures.R: produces the interflex interaction figures in the ED
observational_point_estimate_figure.R: produces the observational results figure in the main text

1bb) randomization_code: 
randomization_January2019.R: the code the generate the randomization scheme for January 2019
randomization_November2018.R: the code the generate the randomization scheme for November 2018
	
##The data folder: 
2) data:
2a) experimental_data:
processed_experimental_data.dta: the pre-processed experiment dataset

2b) observational_data:
processed_observational_data.dta: the pre-processed observational dataset

2c) spatial_data:
sal_inequality_gauteng.shp (and associated files): a sal-level shapefile of Gauteng with inequality metric

##The output folder: [The files in the code folder will automatically populate the relevant folders below]
3) output:
3a) figures: all final figures output here
3b) maps: all maps output here
3c) other_tables: all non-regression tables output here
3d) regressions: all regression outputs (tables and .csv results) output here